package com.jbm.onehome.iface;

import javax.persistence.*;
import com.jbm.core.iface.IAcross;

/**
 * Created by lyh on 2017-02-24.
 */
@Entity
@Table(name = "info_geo_price", schema = "", catalog = "")
@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
public class InfoGeoPriceEntity extends IAcross
{
	public InfoGeoPriceEntity()
	{
		super();
	}

	public InfoGeoPriceEntity(IAcross ia)
	{
		super(ia);
	}

    private static final long serialVersionUID = -3763600296961750963L;
    private int priceid;
    private int giId;
    private Integer price;
   // private GeoInfoEntity geoInfoEntity;

    @Id
    @Column(name = "priceid")
    @GeneratedValue
    public int getPriceid() {
        return priceid;
    }

    public void setPriceid(int priceid) {
        this.priceid = priceid;
    }

    @Basic
    @Column(name = "gi_Id")
    public int getGiId() {
        return giId;
    }

    public void setGiId(int giId) {
        this.giId = giId;
    }

    @Basic
    @Column(name = "price")
    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        InfoGeoPriceEntity that = (InfoGeoPriceEntity) o;

       // if (giId != that.giId) return false;
        if (priceid != that.priceid) return false;
        if (price != null ? !price.equals(that.price) : that.price != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = priceid;
       // result = 31 * result + giId;
        result = 31 * result + (price != null ? price.hashCode() : 0);
        return result;
    }
//    @OneToOne
//    @JoinColumn(name="gi_id",insertable=false,unique=true,updatable = false)
//    public GeoInfoEntity getGeoInfoEntity() {
//        return geoInfoEntity;
//    }
//
//    public void setGeoInfoEntity(GeoInfoEntity geoInfoEntity) {
//        this.geoInfoEntity = geoInfoEntity;
//    }

    @Transient
    public boolean back;
    @Transient
    public String method;
    @Transient
    public String errorinfo;
    @Transient
    public int count;
    @Transient
    public int start=0;
    @Transient
    public int pagesize=0;
    @Transient
    public Integer tableid;
}
